<template>
  <div>
    <div class="header">
      <div class="header-left">
        <div class="iconfont">&#xe63c;</div>
        返回
      </div>
      <div class="header-input">
        <span class="iconfont">&#xe64e;</span>
        请输入城市/旅游景点
      </div>
      <router-link to="/City">
        <div class="header-right">
          <span class="iconfont">&#xe501;</span>
          {{this. city}}
        </div>
      </router-link>
    </div>
  </div>
</template>

<script>
  import {mapState} from 'vuex'
  export default {
    name: "Header",
    computed:{
      ...mapState(['city'])
    }
  }
</script>

<style lang="stylus" scoped>
  @import "~styles/variable.styl"
  .header
    display flex
    background: $bgColor
    height .86rem
    line-height .86rem
    color #fff

    .header-left
      width .64rem
      float left
      text-align center

    .header-input
      flex 1
      margin-top .12rem
      height  .64rem
      border-radius .1rem
      background: #fff
      margin-left .2rem
      color #333333
      line-height .64rem
      padding-left .2rem

    .header-right
      float right
      min-width 1.04rem
      padding  0 .1rem
      text-align center
      color #fff
</style>
